home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
tbbs
/
prgsourc.zip
/
HOMES.ZIP
/
EDIT.PRG
< prev
next >
Wrap
Text File
|
1996-01-14
|
14KB
|
423 lines
PROCEDURE edit
SET ORDER TO 2
DO WHILE .T.
ok = .F.
DO cls WITH 0,0,20,79
SET COLOR TO R/R
@ 0,0 CLEAR TO 1,79
@ 21,0 CLEAR TO 23,79
SET COLOR TO GR+/R
@ 0,5 SAY "Real Estate Listings in " + city
@ 21,3 SAY "Enter letter to select"
@ 22,3 SAY "<Esc>"
SET COLOR TO W+/R
@ 1,5 SAY "Agent: " + hu
@ 0,73 SAY "EDIT "
@ 1,73 SAY "SCREEN"
@ 22,9 SAY "= Quit Edit Screen"
DO escr
charin = " "
SET COLOR TO N/N
@ 2,0 GET charin
READ
DO CASE
CASE LastKey() = 27 && <Esc>
EXIT
CASE LastKey() = 68 .OR. LastKey() = 100 && 'D' or 'd': Delete
SET COLOR TO R/R
@ 21,3 CLEAR TO 22,30
DO gpic WITH 1
IF .NOT. ok
LOOP
ENDIF
DO cls WITH 2,0,20,79
DO vscr
DO view
DO BoxW WITH 9,20,12,49
@ 10,22 SAY "Are you sure that you want"
@ 11,22 SAY "to delete this listing?"
DO ty
SET COLOR TO N/N
@ 2,0 GET charin
DO WHILE .T.
READ
DO CASE
CASE LastKey() = 89 .OR. LastKey() = 121 && `Y' or `y'
REPLACE price WITH 0,size WITH 0,acres WITH 0,garage WITH .F.
REPLACE heatpump WITH .F.,ac WITH .F.,basement WITH .F.
REPLACE beds WITH 1, baths WITH .5
DELETE
DO cls WITH 2,0,20,79
DO BoxW WITH 9,26,11,53
@ 10,28 SAY "Listing has been deleted"
key = InKey(3)
EXIT
CASE LastKey() = 78 .OR. LastKey() = 110 && 'N' or 'n'
EXIT
OTHERWISE
LOOP
ENDCASE
ENDDO
LOOP
CASE LastKey() = 78 .OR. LastKey() = 110 && 'N' or 'n': New
DO enew
IF .NOT. ok
LOOP
ENDIF
ok = .F.
REPLACE memo1 WITH "You have these three lines to enter any additional details about the home,"
REPLACE memo2 WITH "or financing information, or any other comments you would like to make."
REPLACE memo3 WITH "Each line is 75 characters wide, and will appear exactly as you enter it."
DO tf
REPLACE status WITH "Listed"
mp = .F.
DO uscr
REPLACE heat WITH ".........."
SET FORMAT TO fupd NOCLEAR
DO WHILE .T.
IF mp
READ SELECT price
ELSE
READ
ENDIF
DO CASE
CASE LastKey() = 3 && <Page Dn>
IF price < 3000
DO BoxW WITH 8,28,10,50
@ 9,30 SAY "Price is incorrect."
key = InKey(3)
mp = .T.
DO uscr
LOOP
ENDIF
IF status = "Listed " .OR. status = "Sold " .OR. status = "Model " .OR. status = "Pending"
ok = .F.
ELSE
DO BoxW WITH 8,26,10,52
@ 9,28 SAY "Status field incorrect."
key = InKey(3)
DO uscr
LOOP
ENDIF
EXIT
OTHERWISE
LOOP
ENDCASE
ENDDO
RELEASE mp
SET FORMAT TO fscr NOCLEAR
DO cls WITH 2,0,20,79
SET COLOR TO GR+/R
@ 21,3 CLEAR TO 23,79
@ 21,3 SAY "<Esc>"
SET COLOR TO W+/R
@ 21,9 SAY "= Quit View Screen, return to Edit Screen"
DO vscr
DO view
DO BoxW WITH 7,16,10,55
@ 8,18 SAY "The listing has been saved. This is"
@ 9,18 SAY "how it will appear when viewed."
key = InKey(4)
DO cls WITH 7,16,10,55
SET COLOR TO W+/N
@ 7,16 SAY ":"
@ 7,16 SAY ":"
@ 7,45 SAY "Garage:"
@ 8,16 SAY "s:"
@ 8,45 SAY "Basement:"
@ 9,16 SAY "e:"
@ 9,45 SAY "Central Air:"
SET COLOR TO BG/N
@ 7,18 SAY beds PICTURE "@B 9"
IF garage
@ 7,53 SAY "Yes "
ELSE
@ 7,53 SAY "Non"
ENDIF
@ 8,19 SAY baths PICTURE "@Z 9"
IF IsInt(baths)
@ 8,Col()+1 SAY " "
ELSE
@ 8,Col()+1 SAY "1/2"
ENDIF
IF basement
@ 8,55 SAY "Y"
ELSE
@ 8,55 SAY "N"
ENDIF
IF heatpump
@ 9,19 SAY "Heat Pump "
SET COLOR TO W+/N
@ 10,8 SAY "Backup Heat:"
SET COLOR TO BG/N
@ 10,21 SAY heat
ELSE
@ 9,19 SAY heat
ENDIF
IF fireplace # 0
SET COLOR TO W+/N
@ 10,45 SAY "Fireplaces:"
ENDIF
DO WHILE LastKey() # 27 && <Esc>
READ
ENDDO
LOOP
CASE LastKey() = 80 .OR. LastKey() = 112 && 'P' or 'p': Add Picture
Do cls WITH 2,0,20,79
DO BoxW WITH 6,13,16,66
@ 7,15 SAY "This selection is used to upload a picture that"
@ 8,15 SAY "has been scanned as a computer image. The image"
@ 9,15 SAY "must be in GIF format. The file may have any name,"
@ 10,15 SAY "as it will be renamed upon upload. Up to four"
@ 11,15 SAY "pictures may be uploaded: an exterior picture, a"
@ 12,15 SAY "map of the property, a floor plan, and an interior"
@ 13,15 SAY "picture."
SET COLOR TO W+/W
@ 15,23 SAY "───── Any Key to Continue ─────"
key = Inkey(40)
Do cls WITH 2,0,20,79
DO BoxW WITH 6,12,15,67
@ 7,14 SAY "If you do not have access to a scanner, many photo"
@ 8,14 SAY "stores will scan photos cheaply. You can also mail"
@ 9,14 SAY "the picture to this BBS, and the picture or map"
@ 10,14 SAY "(up to 8½ x 11) will be scanned for you. There is"
@ 11,14 SAY "a charge of $5.00. Please write the reference number"
@ 12,14 SAY "on the back, and the name of the listing agent."
SET COLOR TO W+/W
@ 14,22 SAY "───── Any Key to Continue ─────"
key = Inkey(40)
Do cls WITH 2,0,20,79
DO BoxW WITH 8,19,10,60
@ 9,21 SAY "Do you have a picture ready to upload?"
DO ty
ok = .T.
SET COLOR TO N/N
@ 2,0 GET charin
DO WHILE .T.
READ
DO CASE
CASE LastKey() = 89 .OR. Lastkey() = 121 && Y or y: yes
EXIT
CASE LastKey() = 78 .OR. Lastkey() = 110 && N or n: No
ok = .F.
EXIT
OTHERWISE
LOOP
ENDCASE
ENDDO
IF .NOT. ok
LOOP
ENDIF
SET COLOR TO R/R
@ 21,3 CLEAR TO 22,30
DO gpic WITH 2
IF .NOT. ok
LOOP
ENDIF
SET COLOR TO GR+/R
@ 21,3 SAY "Enter letter to select"
@ 22,3 SAY "<Esc>"
SET COLOR TO W+/R
@ 22,9 SAY "= Quit Upload"
DO cls WITH 2,0,20,79
DO pscr
SET COLOR TO N/N
@ 2,0 GET charin
DO WHILE .T.
READ
DO CASE
CASE LastKey() = 27 && <Esc>
EXIT
CASE LastKey() = 80 .OR. LastKey() = 112 && P or p:Picture
REPLACE pic WITH .T.
DO cls WITH 0,0,23,79
DO BoxW WITH 2,28,5,77
@ 3,30 SAY "You will need to send the file using your file"
@ 4,30 SAY "name when prompted by, Ready to receive.."
key = InKey(3)
SET COLOR TO W+/N
DOTBBS TYPE 30 OPTDATA "C:\HOMEBASE\PICS\" + homes + pic1 + "PIC.GIF /F/D"
QUIT
CASE LastKey() = 77 .OR. LastKey() = 109 && M or m:Map
REPLACE map WITH .T.
DOTBBS TYPE 30 OPTDATA "C:\HOMEBASE\PICS\" + homes + pic1 + "MAP.GIF /F/D"
QUIT
CASE LastKey() = 70 .OR. LastKey() = 102 && F or f:Floor Plan
REPLACE pln WITH .T.
DOTBBS TYPE 30 OPTDATA "C:\HOMEBASE\PICS\" + homes + pic1 + "PLN.GIF /F/D"
QUIT
CASE LastKey() = 73 .OR. LastKey() = 105 && I or i:Interior
REPLACE int WITH .T.
DOTBBS TYPE 30 OPTDATA "C:\HOMEBASE\PICS\" + homes + pic1 + "INT.GIF /F/D"
QUIT
OTHERWISE
LOOP
ENDCASE
ENDDO
LOOP
CASE LastKey() = 85 .OR. LastKey() = 117 && 'U' or 'u': Update
SET COLOR TO R/R
@ 21,3 CLEAR TO 22,30
DO gpic WITH 2
IF .NOT. ok
LOOP
ENDIF
DO tf
DO uscr
mp = .F.
SET FORMAT TO fupd NOCLEAR
DO WHILE .T.
IF mp
READ SELECT price
ELSE
READ
ENDIF
DO CASE
CASE LastKey() = 3 && <Page Dn>
IF price < 5000
DO BoxW WITH 8,28,10,50
@ 9,30 SAY "Price is incorrect."
mp = .T.
DO uscr
LOOP
ENDIF
IF status = "Listed" .OR. status = "Sold" .OR. status = "Model" .OR. status = "Pending"
ok = .F.
ELSE
DO BoxW WITH 8,26,10,52
@ 9,28 SAY "Status field incorrect."
DO uscr
LOOP
ENDIF
EXIT
OTHERWISE
LOOP
ENDCASE
ENDDO
RELEASE mp
SET FORMAT TO fscr NOCLEAR
LOOP
CASE LastKey() = 86 .OR. LastKey() = 118 && 'V' or 'v': View listings
IF own
DO cls WITH 2,0,20,79
SET COLOR TO GR+/R
@ 22,1 CLEAR TO 22,50
DO BoxW WITH 7,6,10,28
@ 8,10 SAY "] Agency Listings"
@ 9,10 SAY "] Broker Listings"
SET COLOR TO W+/W
@ 8,8 SAY "["
@ 9,8 SAY "["
SET COLOR TO GR+/W
@ 8,9 SAY "A"
@ 9,9 SAY "B"
ok = .T.
SET COLOR TO N/N
@ 2,0 GET charin
DO WHILE .T.
READ
DO CASE
CASE LastKey() = 65 .OR. LastKey() = 97 && 'A' or 'a'
DO atag
SELECT a
DO lview
SET ORDER TO 2
ok = .F.
EXIT
CASE LastKey() = 66 .OR. LastKey() = 98 && 'B' or 'b'
brok = " "
DO BoxW WITH 7,6,10,33
@ 8,8 SAY "Select the listing agent"
@ 9,8 SAY "from the pick list"
DO pagnt
EXIT
OTHERWISE
LOOP
ENDCASE
ENDDO
IF .NOT. ok
LOOP
ENDIF
ELSE
brok = agnte
ENDIF
DO etag
DO lview
SET ORDER TO 2
LOOP
OTHERWISE
LOOP
ENDCASE
ENDDO
RETURN
PROCEDURE gpic
PARAMETERS ch
pc = "..."
DO cls WITH 2,0,20,79
DO BoxW WITH 8,20,11,52
@ 9,22 SAY "Enter the reference number of"
IF ch = 1
@ 10,22 SAY "the listing to delete:"
ELSE && ch = 2
@ 10,22 SAY "the listing to update:"
ENDIF
SET COLOR TO W+/W
@ 10,45 GET pc PICTURE "@K "
READ
SEEK pc
IF .NOT. Found()
DO BoxB WITH 5,40,7,77
@ 6,42 SAY "Reference number"
@ 6,63 SAY "was not found"
SET COLOR TO GR+/B
@ 6,59 SAY pc
key = Inkey(5)
ok = .F.
RETURN
ENDIF
IF uPriv() = 255
ok = .T.
RETURN
ENDIF
IF own
SELECT c
SEEK a->broker
IF comp # agency
DO BoxB WITH 4,40,7,77
@ 5,44 SAY "Not your listing. You are not"
@ 6,42 SAY "authorized to modify or delete it."
key = InKey(5)
SELECT a
ok = .F.
RETURN
ENDIF
SELECT a
ELSE
IF agnte # broker
DO BoxB WITH 4,40,7,77
@ 5,44 SAY "Not your listing. You are not"
@ 6,42 SAY "authorized to modify or delete it."
key = InKey(5)
ok = .F.
RETURN
ENDIF
ENDIF
ok = .T.
RETURN